﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProvinceManagement.aspx.cs"
    Inherits="BEGDC.CC.Web.CIS2.Admin.ProvinceManagement" %>

<%@ Register Src="../../../UserControls/Pager.ascx" TagName="Pager" TagPrefix="cc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../../../css/global.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/content/entity.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/content/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/main.css" rel="stylesheet" type="text/css" />

    <script src="../../../js/jquery-1.4.4.min.js" type="text/javascript"></script>

    <script src="../../../js/jquery-ui.min.js" type="text/javascript"></script>

    <script src="../../../js/entity.js.aspx" type="text/javascript"></script>

</head>
<body>
    <form runat="server">
    <div class="mainbox">
        <div class="sitemapbox">
            <div id="info" class="sitemap">
                &nbsp;»&nbsp;Administration &nbsp;»&nbsp;Province Mgmt
            </div>
        </div>
        <table cellspacing="0" cellpadding="0">
            <tr>
                <td>
                    <!--tab区域-->
                    <div class="tabbox purplebg_dark">
                        <ul class="tabpos">
                            <li><span class="tab_active">
                                <%=Resources.PageTitles.ProvinceManagement%></span></li>
                        </ul>
                    </div>
                    <div class="formbox">
                        <span class=" float_lft">
                            <div class="formbox_float_lft">
                                <asp:Button ID="BtnAdd" runat="server" CssClass="entity-add" />
                            </div>
                            <div class="formbox_float_rgt">
                                <asp:TextBox ID="SearchText" runat="server" CssClass="txtbox width140 entity-search-text"
                                    ToolTip="Province Name,Comment"></asp:TextBox>
                                <asp:Button ID="Searchbtn" runat="server" CssClass="entity-search" />
                                <asp:Button ID="Cleanbtn" runat="server" CssClass="entity-clear" />
                            </div>
                        </span>
                    </div>
                </td>
            </tr>
        </table>
        <table width="100%" id="Table1" cellspacing="0" cellpadding="0" border="0">
            <tbody>
                <tr>
                    <td>
                        <asp:GridView ID="gvProvince" runat="server" AllowPaging="True" AllowSorting="True"
                            AutoGenerateColumns="False" DataKeyNames="ProvinceID" DataSourceID="edsProvince"
                            EmptyDataText="There is no data to display!" CssClass="tablestyle">
                            <RowStyle CssClass="tbody" />
                            <HeaderStyle CssClass="thead" ForeColor="#ffffff" />
                            <Columns>
                                <asp:BoundField DataField="Name" HeaderText="Province<br/>省份名称" HtmlEncode="false"
                                    SortExpression="Name" ItemStyle-Width="46.5%" />
                                <asp:BoundField DataField="Description" HeaderText="Comment<br/>备注" HtmlEncode="false"
                                    SortExpression="Description" ItemStyle-Width="47%" />
                                <asp:ActionField HeaderText="Action<br />操作" HeaderStyle-CssClass="entity-action"
                                    ShowDisableButton="true" ShowModifyButton="true" ShowViewButton="true" ItemStyle-Width="60" />
                            </Columns>
                            <PagerTemplate>
                                <cc:Pager runat="server" />
                            </PagerTemplate>
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:DetailsView ID="dvProvince" runat="server" AutoGenerateRows="False" DataKeyNames="ProvinceID"
                            DataSourceID="edsProvince" EnableModelValidation="True" Visible="False" CssClass="tablestyle2"
                            Width="955">
                            <HeaderStyle CssClass="tablestyle2_Title"></HeaderStyle>
                            <HeaderTemplate>
                                <%=Resources.PageTitles.ProvinceManagement%>
                            </HeaderTemplate>
                            <FieldHeaderStyle CssClass="tablestyle2_tdTitle" />
                            <Fields>
                                <asp:CustomizeBoundField DataField="Name" HeaderText="Province (省份名称)" HtmlEncode="false"
                                    SortExpression="Name" ItemStyle-CssClass="entity-notnull-check entity-length-check"
                                    MaxLength="50" />
                                <asp:CustomizeBoundField DataField="Description" HeaderText="Comment (备注)" HtmlEncode="false"
                                    SortExpression="Description" ItemStyle-CssClass="entity-length-check" MaxLength="50" />
                                <asp:ActionField ShowEditButton="true" ShowInsertButton="true" ShowInsertMoreButton="true"
                                    ShowCloseButton="true" />
                            </Fields>
                        </asp:DetailsView>
                        &nbsp;
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <%--以下是数据源--%>
    <asp:EntityDataSource ID="edsProvince" runat="server" ConnectionString="name=CCEntities"
        DefaultContainerName="CCEntities" EnableInsert="True" EnableUpdate="True" EntitySetName="Provinces"
        Where="it.Disabled = false" OnInserted="edsProvince_Inserted" OnUpdated="edsProvince_Updated">
    </asp:EntityDataSource>
    </form>
    <%--页面刷新时显示--%>
    <div id="dialog-message" title="Loading..." style="display: none">
        <p>
            <br />
            <span class="entity-loading"></span><span>Operation in process, please wait...<br />
                <br />
                处理中, 请稍候。。。</span>
        </p>
    </div>
</body>
</html>
